package com.my.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.my.mapper.PmsProductMapper;
import com.my.pojo.PmsProduct;
import com.my.pojo.PmsSkuValue;
import com.my.pojo.PmsSpuValue;
import com.my.service.IPmsProductService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author wangyu
 * @since 2021-07-07
 */


@Service
public class PmsProductServiceImpl extends ServiceImpl<PmsProductMapper, PmsProduct> implements IPmsProductService {

    @Override
    public IPage<PmsProduct> page(Integer pageNo, Integer pageSize, String name) {
        QueryWrapper<PmsProduct> wrapper = new QueryWrapper<>();
        if (StringUtils.isNotBlank(name)) {
            wrapper.like("name", name);
        }
        System.out.println(wrapper);
        return this.page(new Page<>(pageNo, pageSize), wrapper);
    }
    @Override
    public void delRelation(Long id){

    }
}
